package com.zg.common.core.dao.scf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zg.common.core.dao.scf.entity.Person;
import com.zg.common.core.dao.scf.entity.PersonApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PersonApplyMapper extends BaseMapper<PersonApply> {

    @Select("SELECT * FROM SCF_PERSON_APPLY WHERE company_id = #{companyId} AND person_type = '1'")
    Person getAgent(Long companyId);

    @Select("SELECT * FROM SCF_PERSON_APPLY WHERE company_id = #{companyId} AND person_type = '2'")
    Person getContact(Long companyId);
}
